home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 September
/
1984-09.d64
/
treasure hunt_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
187 lines
10 poke53280,6:poke53281,1
21 poke56,48:poke52,48:clr
25 print"[147][129]*************treasure hunt[146]**************"
26 print" redefining characters"
28 poke56334,peek(56334)and254:poke1,peek(1)and251
30 fori=0to511:pokei+12288,peek(53248+i):next
32 poke1,peek(1)or4:poke56334,peek(56334)or1
40 fori=12288+35*8to12288+47*8+7:reada:pokei,a:next
41 fori=12288+58*8to12288+61*8+7:reada:pokei,a:next
45 poke53272,21:gosub800:sn=54272:pokesn+24,15:pokesn+5,17:pokesn+6,240
49 pokesn,100:gosub200
50 poke53272,(peek(53272)and240)or12:rn=rn+1:p=1:q=40
55 gosub510:gosub1000:gosub1300
60 cl=1902
65 js=peek(56320)and15
70 tl=cl:z=cl:onjs-4gosub94,92,93,99,96,98,97,99,95,91,99
75 cl=z:pokesn+1,50:pokesn+4,33:gosub300
76 ifflandnotdfthengosub650
77 pokesn+4,32:ifdfthen1600
79 poketl,32:poketl+q,32
80 pokecl,46:pokecl+q,47:pokecm+cl,3:pokecm+q+cl,3:gosub540:ifgc<2andgb<2then50
85 gosub600:ifdfthen1600
90 goto65
91 z=z-q:return
92 z=z-39:return
93 z=z+p:return
94 z=z+41:return
95 z=z+q:return
96 z=z+39:return
97 z=z-p:return
98 z=z-41:return
99 return
200 print"[152]enter skill level 1-5"
210 geta$:ifa$=""then210
220 aa=val(a$):ifaa<1oraa>5then210
230 return
300 rem collision chk
302 tc=0:ifpeek(cl)=35orpeek(cl+q)=35orpeek(cl)=36orpeek(cl+q)=36thentc=p
303 ifpeek(cl)=37orpeek(cl+q)=37orpeek(cl)=38orpeek(cl+q)=38thentc=p
304 ifpeek(cl)=39orpeek(cl+q)=39orpeek(cl)=40orpeek(cl+q)=40thentc=p
305 ifpeek(cl)=41orpeek(cl+q)=41thentc=p
306 iftcthencl=tl:return
308 if(peek(cl)=47andpeek(cl+q)=32)or(peek(cl)=32andpeek(cl+q)=46)thenreturn
309 ifpeek(cl)=32andpeek(cl+q)=32thenreturn
310 ifpeek(cl)=46andpeek(cl+q)=47thenreturn
312 ifpeek(cl)=42orpeek(cl+q)=42then400
315 ifpeek(cl)=61orpeek(cl+q)=61thengb=gb-p:sc=sc+10*aa:pokesn+1,30:pokesn+4,33
320 ifpeek(cl)=60orpeek(cl+q)=60thengc=gc-p:sc=sc+aa:pokesn+1,80:pokesn+4,33
323 ifpeek(cl)=43orpeek(cl+q)=43orpeek(cl)=44orpeek(cl+q)=44then450
325 ifpeek(cl)=45orpeek(cl+q)=45then650
330 return
400 remdead from skul
405 poketl,32:poketl+q,32:pokecl,46:pokecl+q,47:pokecl+cm,0:pokecl+cm+q,0
410 goto700
450 rem at bog
452 d=int(rnd(1)*10)+1
453 jb=not(-(peek(56320)and16)/16)
455 ifjbandpeek(cj)=59andd>2thencl=ch:pokeci,32:sc=sc+100*aa:fg=p:return
460 ifjbandpeek(cj)<>59andd>2thencl=cl+47:goto300
465 cl=ch+41:poketl,32:poketl+q,32:pokecl,46:pokecm+cl,3:goto700
500 rem border
510 print"[147]":cm=54272
520 fori=1024to1063:pokei,35:pokecm+i,14:next
525 fori=1103to2023step40:pokei,35:pokecm+i,14:next
530 fori=1982to1943step-1:pokei,35:pokecm+i,14:next
535 fori=1984to1064step-40:pokei,35:pokecm+i,14:next
536 return
539 rem scor+tres chst
540 print"[159]round"rn"score"sc;:iffgthen555
545 rd=int(rnd(1)*15)
550 onrdgosub555,555,555,555,555,555,561,555,555,555,555,555,563,555,555
555 return
561 ifpeek(ci)=32andpeek(cj)=32thenpokeci,58:pokecj,59:pokeci+cm,6:pokecj+cm,6
562 return
563 ifpeek(ci)=58thenpokeci,32:pokecj,32
564 return
600 remmoveskulls
605 d=int(rnd(1)*aa)+1:ondgosub641,642,643,644,645
608 ts=sk:z=sk:pokesk,32
610 onint(rnd(1)*8)+1gosub91,92,93,94,95,96,97,98
615 sk=z:ifpeek(sk)=32thenondgosub1381,1382,1383,1384,1385:goto625
620 ifpeek(sk)=46orpeek(sk)=47then400
622 sk=ts
625 pokesk,42:pokesk+cm,7:return
641 sk=s1:return
642 sk=s2:return
643 sk=s3:return
644 sk=s4:return
645 sk=s5:return
650 remstagger
655 poketl,32:poketl+q,32:pokecl,46:pokecl+q,47:pokecl+cm,4:pokecl+cm+q,4
660 pokesn+1,40:pokesn+4,33:fori=1to10:next:pokesn+1,45:fori=1to25:next
662 pokesn+4,32
665 tl=cl:z=cl:onint(rnd(1)*8)+1gosub91,92,93,94,95,96,97,98
670 cl=z:iffl=.thenfl=p:goto300
680 iffl=pthenfl=.:goto300
700 remdeadsound
710 pokesn+1,40:pokesn+4,33:forx=1to5:pokesn+1,40:forl=1to50:next:pokesn+1,20
715 forl=1to50:next:next:pokesn+4,32
720 df=1:return
800 print"[147][151]you are hunting lost pirate treasure on ";
810 print"a secluded island. ";
820 print"guide the hunter with joystick #2 to the";
830 print"coins, gold bars and a treasure chest. ";
831 print"the treasure chest is surrounded by a ";
832 print"bog. you have a 70% chance of crossing ";
835 print"by pressing the fire button as you ";
836 print"approach. ";
838 print"[156]the treasure has a death curse on it and";
839 print"is guarded by the evil spirits of ";
840 print"ancient pirates who make the treasure ";
841 print"chest disappear and reappear from time ";
842 print"to time. ";
854 print"the evil spirits also have placed kegs ";
855 print"of rum around the island to distract ";
856 print"treasure hunters. ";
857 print"[154]if the treasure hunter drinks rum, he ";
858 print"will stagger and you can't guide him. ";
860 print"you earn points as shown: ";
865 print"coin=1 x skill level ";
866 print"bar=10 x skill level ";
867 print"treasure chest=100 x skill level ";
880 return
999 rembuild palmgrove
1000 tb=int(rnd(1)*8)+2:print"":i=int(rnd(1)*3)+1:forx=0toi:print"":next
1005 printtab(tb)"&%'&%'"
1006 printtab(tb)"($&%')&%'"
1010 printtab(tb)"$($&%'$)"
1015 printtab(tb)"$($)$"
1020 printtab(tb)"$ $ $"
1023 printtab(tb)"$[144] ,+"
1025 printtab(tb)"$:; [144],"
1027 printtab(tb)",+"
1028 printtab(tb)"+,+,"
1030 ch=peek(209)+256*peek(210)-(160-(tb+7)):cj=ch+q:ci=cj-p
1035 return
1300 rem build screen
1301 fori=pto7*aa
1302 x=int(rnd(1)*720)+1064
1305 ifpeek(x)<>32orpeek(x+p)<>32orpeek(x-p)<>32orpeek(x+q)<>32then1302
1306 ifpeek(x-q)<>32then1302
1310 pokex,45:pokecm+x,4:next
1320 fori=pto6*aa
1325 x=int(rnd(1)*720)+1064
1330 ifpeek(x)<>32orpeek(x+p)<>32orpeek(x-p)<>32orpeek(x+q)<>32then1325
1331 ifpeek(x-q)<>32then1325
1335 pokex,42:pokecm+x,0:next
1360 fori=ptoaa
1365 sk=int(rnd(1)*720)+1064:ifpeek(sk)<>42then1365
1370 pokesk+cm,7
1375 onigosub1381,1382,1383,1384,1385
1380 next:goto1400
1381 s1=sk:return
1382 s2=sk:return
1383 s3=sk:return
1384 s4=sk:return
1385 s5=sk:return
1400 gc=25:b=60:fori=1to25
1410 gosub1450
1415 ifpeek(x)<>32orpeek(x+q)><32orpeek(x-q)><32then1410
1420 pokex,b:pokecm+x,7:next
1430 gb=5:b=61:fori=1to5
1435 gosub1450
1437 ifpeek(x)<>32orpeek(x+q)><32orpeek(x-q)><32then1435
1440 pokex,b:pokecm+x,7:next
1445 return
1450 x=int(rnd(1)*755)+1064:return
1600 remgameover
1605 pokesn+4,32:poke53272,21
1610 print"[147][158]another victim of the pirate's curse!!!"
1611 print"skill level:"aa
1612 print"rounds:"rn
1613 print:print"score:"sc
1615 print:print"play again?"
1620 geta$:ifa$=""then1620
1625 ifa$="y"thenrn=0:fl=0:fg=0:df=0:sc=0:print"[147]":goto49
1630 end
6060 data255,255,255,255,255,255,255,255,28,28,28,28,28,28,28,28
6065 data129,227,247,255,255,255,255,156,15,127,127,227,143,63,113,243
6070 data248,254,254,227,249,252,207,227,199,159,62,56,120,96,96,64,121,120,28
6071 data14,6,6,7,
6075 data60,126,90,126,126,36,60,24,28,63,31,255,255,127,124,56
6080 data60,254,255,255,243,120,56,60,28,62,62,62,62,62,62,28
6085 data60,126,219,255,102,60,24,255,189,189,189,189,36,36,36,102
6087 data15,31,63,63,63,63,63,63,248,252,254,254,254,254,254,254
6090 data,,,24,24,,,,,,,127,127,,,0